class Goods:
    def __init__(self,name,price):
        self.name = name
        self.price = price

class Phone(Goods):
    def __init__(self,name,price,capacity,size):
        super().__init__(name,price)
        self.capacity = capacity
        self.size= size

phone = Phone('小米',3888,128,'7寸')
print(phone.name)
print(phone.price)
print(phone.capacity)
print(phone.size)